<!DOCTYPE html>
<html lang="en">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>
    IDEA进行springBoot项目打包及部署 |
    
    铁血军</title>
  
    <link rel="shortcut icon" href="/favicon.ico">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/css/technology.css">
  
    <link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">
  
  <script src="/js/pace.min.js"></script>
</head>
</html>
<body>
  <div id="container">
    <div id="wrap">
      <section class="outer">
  <article id="post-springBoot项目打包及部署" class="article article-type-post" itemscope itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      IDEA进行springBoot项目打包及部署
    </h1>
  

      </header>
    

    
      <div class="article-meta">
        <a href="/2019/07/16/springBoot项目打包及部署/" class="article-date">
  <time datetime="2019-07-16T14:32:10.000Z" itemprop="datePublished">2019-07-16</time>
</a>
        
      </div>
    

    <div class="article-entry" itemprop="articleBody">
      

      

      
        <p>很简单很简单的，除非你进来就踩坑了，具体的踩坑报错，后续我会更新。这里假设你是一个正常项目进来的<br><br>1、首选点击idea的marven工程如图所示：<br><br><img src="images/springBoot%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%8F%8A%E9%83%A8%E7%BD%B2/1.png" alt="marvenProject"></p>
<p>2、再你额pop中引入如下的插件<br></p>
<pre><code>&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
&lt;version&gt;2.4.2&lt;/version&gt;</code></pre><p>3、点击package,如下图所示，如果怕出错，先点下clean<br><br><img src="images/springBoot%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%8F%8A%E9%83%A8%E7%BD%B2/2.png" alt="marvenProject"><br>4、此时你的target目录录下出校了个jar包<br><br><img src="images/springBoot%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%8F%8A%E9%83%A8%E7%BD%B2/3.png" alt="marvenProject"><br>心里不踏实的话，本地先测试下，直接target目录下用命令java -jar xx.jar运行下你的包看是否成功<br><br>5、部署到服务器<br><br>随意放到一个服务器目录下，用命令java -jar xx.jar启动。当然，这样服务器重启或者退出时程序就退出了，linnux守护进程请用sudo nohup&amp; commands.也可以参考我的另一篇博客<br><a href="https://weareallgod.github.io/2019/07/16/Linux%E5%B8%B8%E7%94%A8%E8%AF%AD%E6%B3%95%E6%B1%87%E6%80%BB/" target="_blank" rel="noopener">Linnux常用语法</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2019/07/16/springBoot项目打包及部署/" data-id="ck3tufcrq000dbwt89v6avwjv"
         class="article-share-link">分享</a>
      
    </footer>

  </div>

  
    
  <nav class="article-nav">
    
      <a href="/2019/07/16/Linux常用语法汇总/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            Linux常用语法汇总
          
        </div>
      </a>
    
    
      <a href="/2019/07/16/pycharm2019绘图窗口无法弹出解决办法/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">pycharm2019绘图窗口无法弹出解决办法</div>
      </a>
    
  </nav>


  

  
    
  

</article>



</section>
    </div>
    <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/lazyload.min.js"></script>
<script src="/js/busuanzi-2.3.pure.min.js"></script>


  <script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/technology.js"></script>

  </div>
</body>
</html>